<script type="text/javascript">
    RED.nodes.registerType('deploy', {
        category: 'zeebe',
        color: '#C0DEED',
        defaults: {
            name: { value: '' },
            zeebe: { required: true, type: 'zeebe' },
        },
        inputs: 1,
        outputs: 1,
        icon: 'zeebe.png',
        label: function () {
            return this.name || 'deploy';
        },
    });
</script>

<script type="text/x-red" data-template-name="deploy">
    <div class="form-row">
        <label for="node-input-name"><i class="icon-tag"></i> Name</label>
        <input type="text" id="node-input-name" placeholder="Name">
    </div>
    <div class="form-row">
        <label for="node-input-zeebe"><i class="fa fa-server"></i> Zeebe Broker</label>
        <input type="text" id="node-input-zeebe" placeholder="Zeebe Broker" />
    </div>
</script>

<script type="text/x-red" data-help-name="deploy">
    <p>Deploy a bpmn workflow to Zeebe</p>

    <h3>Inputs</h3>

    <dl class="message-properties">
        <dt>payload.definition <span class="property-type">string</span></dt>
        <dd>The workflow definition as a UTF8-encoded string</dd>

        <dt>payload.resourceName <span class="property-type">string</span></dt>
        <dd>The workflow resource name (e.g. 'myWorkflow.bpmn')</dd>
    </dl>

    <h3>Outputs</h3>
    <ol class="node-ports">
        <li>Standard output
            <dl class="message-properties">
                <dt>payload <span class="property-type">object</span></dt>
                <dd>JSON object containing information about the deployed workflow.</dd>
            </dl>
        </li>
    </ol>
</script>
